package module.app
{
	import flash.display.Bitmap;
	import flash.display.NativeWindow;
	import flash.display.NativeWindowInitOptions;
	import flash.display.NativeWindowSystemChrome;
	import flash.display.NativeWindowType;
	import flash.display.StageAlign;
	import flash.display.StageScaleMode;
	import flash.system.Capabilities;
	
	public class SplashWindow extends NativeWindow
	{
		[Embed(source="../../../assets/Splash.jpg")]
		private var bgCls:Class;
		[Embed(source="../../../assets/Splash_r.jpg")]
		private var bgCls_r:Class;
		public function SplashWindow()
		{
			var windowInit:NativeWindowInitOptions	= new NativeWindowInitOptions();
			windowInit.type							= NativeWindowType.UTILITY;
			windowInit.systemChrome					= NativeWindowSystemChrome.NONE;
			windowInit.transparent=true;
			super(windowInit);
			
			this.title="1111";
			this.height								= 731;
			this.width								= 731;
			this.stage.scaleMode					= StageScaleMode.NO_SCALE;
			this.stage.align						= StageAlign.TOP_LEFT;
			var img:Bitmap;
			if(stage.contentsScaleFactor==1)
				img									= new bgCls() as Bitmap;
			else
			{
				img									= new bgCls_r() as Bitmap;
				img.scaleX = img.scaleY = .5;
			}
			this.x									= (Capabilities.screenResolutionX-img.width)/2;
			this.y									= (Capabilities.screenResolutionY-img.height)/2;
			this.stage.addChild(img);
		}
	}
}